
import ApiResult from "@/api/base/ApiResult";
import {request,post} from "@/utils/request";
import {
  IFlowModelData,
  IFlowModelCard,
  IModelInfoData,
  JourneyData,
  JourneyStrategyItem
} from "@/api/modules/flowModel";

export async function getFlowModelList(data:IFlowModelData):Promise<ApiResult<IFlowModelCard[]>>{
  return request('flow/canvasTemplate/pageList',data)
}

// 根据ID获取模板的节点信息，边信息，事件信息等
export async function getModelData(data: IModelInfoData): Promise<ApiResult<any>> {
  return request('flow/canvasTemplate/getInfo', data)
}


/**
 * 营销自动化 - 流程模板 - 选择模型的cascader选项 一级列表
 */
export function getJourneyStrategy (data: JourneyData): Promise<ApiResult<JourneyStrategyItem[]>> {
  return request('flow/marketingJourneyInfoEntity/pageRemote', data)
}

/**
 * 营销自动化 - 流程模板 - 选择模型的cascader选项 二级列表
 */
export function getJourneyInfo (data: JourneyData): Promise<ApiResult<JourneyStrategyItem[]>> {
  return request('flow/marketingJourneyStrategyEntity/pageRemote', data)
}
